import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: xiaotutu
 * Date: 2024-03-08
 * Time: 16:18
 */

/*public class Person {
    private String name;
    private String gender;
    int age;

    // 想要让该类支持深拷贝，覆写Object类的clone方法即可

    @Override
    public Person clone()  {
        return (Person)super.clone();
    }
}*/

public class demo4 {
    public static int getData(){
        Scanner sc = new Scanner(System.in);
        try{

            int data = sc.nextInt();
            int ret = 10/data;
            System.out.println("ret的值是: " + ret);

        }catch (InputMismatchException e){
            e.printStackTrace();
        }finally {
            sc.close();
            System.out.println("finally中代码");
        }
        System.out.println("try-catch-finally之后代码");

        return 0;
    }
    public static void main(String[] args) {
        int data = getData();
        System.out.println(data);
    }
}
